package com.yuanhua.xcxmng.wechat.service.impl;

import com.yuanhua.xcxmng.wechat.entity.User;
import com.yuanhua.xcxmng.wechat.mapper.UserMapper;
import com.yuanhua.xcxmng.wechat.service.BaseService;
import com.yuanhua.xcxmng.wechat.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends BaseService implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int updateByPrimaryKeySelective(User record) {
        try {
            return userMapper.updateByPrimaryKeySelective(record);
        } catch (Exception e) {
            logger.error(e,e.getMessage());
            throw e;
        }
    }

    @Override
    public int updateByPrimaryKey(User record) {
        try {
            return userMapper.updateByPrimaryKey(record);
        } catch (Exception e) {
            logger.error(e,e.getMessage());
            throw e;
        }
    }
}
